home *** CD-ROM | disk | FTP | other *** search
INI File | 2006-09-13 | 849 b | 42 lines |
- [SUBJECT]
- Description=Displays how many days until a given date
- ImageIndex=-1
- Folder=Mathematics
-
- [BODY_TEXT]
- ;<script language="JavaScript">
- ;<!-- Begin
- ;var date = new Date("`date`");
- ;var description = "`description`";
- ;var now = new Date();
- ;var diff = date.getTime() - now.getTime();
- ;var days = Math.floor(diff / (1000 * 60 * 60 * 24));
- ;document.write("<center><h3>");
- ;if (days > 1) {
- ;document.write(days+1 + " days until " + description);
- ;}
- ;else if (days == 1) {
- ;document.write("Only two days until " + description);
- ;}
- ;else if (days == 0) {
- ;document.write("Tomorrow is " + description);
- ;}
- ;else {
- ;document.write("It's" + description + "!");
- ;}
- ;document.write("</h3></center>");
- ;// End -->
- ;</script>
- ;
-
-
- [`date`]
- Kind=S
- Value=January 1, 2003
-
- [`description`]
- Kind=S
- Value=the year 2003
-
-
-